package com.motorhome.manage.dao;

import com.motorhome.base.dao.Pager;
import com.motorhome.manage.domain.Car;
import com.motorhome.manage.domain.Price;

import java.util.List;

/**
 * @author: John
 */
public interface CarDao {

    Pager<Car> getCarList(int page, int pageSize);
    Pager<Car> getCarListType(int page, int pageSize,int type);

    int addCar(String name, String description, int status, String remark, String picPath, String viewUrl, Float insurance, int carNum,int flag);

    int updateCar(long id, String name, String description, int status, String remark, String picPath, String viewUrl, Float insurance, int carNum,int flag);

    int deleteCar(long id);

    int insertPrice(long carId, String priceDesc, float price, int orderBy,
                    float rateWeekend,
                    float rate1, int day1,
                    float rate2, int day2,
                    float rate3, int day3,
                    float topVipRate);

    int deletePrice(long priceId);

    List<Price> getCarPrice(List<Long> carIds);

    Car getCarByDeviceId(String deviceId, String deviceNumber);

    int bindDevice(long carId, String deviceId, String deviceNumber, String deviceName);
}
